;; Examples demonstrating the rationalize function

;; Basic usage
(rationalize 0 0)           ; 0
(rationalize 1/3 1/10)      ; 1/3
(rationalize 1 1/10)        ; 1
(rationalize 0.3 0.1)       ; 1/3
(rationalize 0 1)           ; 0
(rationalize 3 1)           ; 3
(rationalize 1.5 0.25)      ; 3/2
(rationalize -0.5 0.1)      ; -1/2
(rationalize 1/2 1/4)       ; 1/2
(rationalize 7/8 1/8)       ; 1

;; More examples
(rationalize 22/7 1/100)    ; 22/7
(rationalize 3.14159 0.00001) ; A simple rational approximation of pi
(rationalize 1.414 0.001)   ; A simple rational approximation of sqrt(2)